package org.example.struct.array;

/**
 * @author liyishan
 * @date 2024/5/10 10:57
 * @apiNote
 */

public class Test00492ConstructRectangle {

    public int[] constructRectangle(int area) {
        int w = (int) Math.sqrt(area);
        while (area % w != 0) {
            --w;
        }
        return new int[]{area / w, w};
    }
}
